/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package modelos;

import java.beans.PropertyChangeSupport;

/**
 *
 * @author luis
 */
public class Reparto {

    public static final String PROP_ACTOR = "PROP_ACTOR";
    public static final String PROP_PELICULA = "PROP_PELICULA";
    public static final String PROP_PROTAGONICO = "PROP_PROTAGONICO";

    private Actor actor;
    private Pelicula pelicula;
    private Boolean protagonico;

    public Reparto() {
    }

    public Reparto(Actor actor, Pelicula pelicula, Boolean protagonico) {
        this.actor = actor;
        this.pelicula = pelicula;
        this.protagonico = protagonico;
    }

    /**
     * @return the actor
     */
    public Actor getActor() {
        return actor;
    }

    /**
     * @param actor the actor to set
     */
    public void setActor(Actor actor) {
        modelos.Actor oldActor = this.actor;
        this.actor = actor;
        propertyChangeSupport.firePropertyChange(PROP_ACTOR, oldActor, actor);
    }

    /**
     * @return the pelicula
     */
    public Pelicula getPelicula() {
        return pelicula;
    }

    /**
     * @param pelicula the pelicula to set
     */
    public void setPelicula(Pelicula pelicula) {
        modelos.Pelicula oldPelicula = this.pelicula;
        this.pelicula = pelicula;
        propertyChangeSupport.firePropertyChange(PROP_PELICULA, oldPelicula, pelicula);
    }

    /**
     * @return the protagonico
     */
    public Boolean getProtagonico() {
        return protagonico;
    }

    /**
     * @param protagonico the protagonico to set
     */
    public void setProtagonico(Boolean protagonico) {
        java.lang.Boolean oldProtagonico = this.protagonico;
        this.protagonico = protagonico;
        propertyChangeSupport.firePropertyChange(PROP_PROTAGONICO, oldProtagonico, protagonico);
    }
    private final transient PropertyChangeSupport propertyChangeSupport = new java.beans.PropertyChangeSupport(this);

}
